/*
 * Copyright (C) 2018 Donlon.
 *
 * 2018秋季C语言练习题（5）
 * http://10.105.242.83/contest/507/
 *
 * B. 路标（新）
 */

#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>

void print_direction(char a, char b) {
  if (a < b) {
    putchar(a);
    putchar(b);
  }
  else {
    putchar(b);
    putchar(a);
  }
}

int main() {
  char route[1000]={0};
  scanf("%s", route);
  int i=0;
  int px=0,py=0;
  int dpx=-1, dpy=0;

  for (i = 0; i < strlen(route); i++) {
    switch (route[i]) {
    case '2':
      dpx = dpx ^ dpy;
      dpy = dpx ^ dpy;
      dpx = dpx ^ dpy;
      dpy = -dpy;
      break;
    case '3':
      dpx = dpx ^ dpy;
      dpy = dpx ^ dpy;
      dpx = dpx ^ dpy;
      dpx = -dpx;
      break;
    }

    px += dpx;
    py += dpy;
  }

  printf("%d,", strlen(route));

  if (px == 0) {
    if (py > 0){
      putchar('n');
    } else {
      putchar('s');
    }
  } else if (py == 0) {
    if (px > 0) {
      putchar('e');
    } else {
      putchar('w');
    }
  } else {
    char c1 = px > 0 ? 'e' : 'w';
    char c2 = py > 0 ? 'n' : 's';
    print_direction(c1, c2);
  }
}
